@inherits StudioComponentBase
<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="@AdditionalAssemblies">
    <Found Context="routeData">
        @if (!AuthorizationIsDisabled)
        {
            <CascadingAuthenticationState>
                <AuthorizeRouteView RouteData="routeData" DefaultLayout="@typeof(MainLayout)">
                    <Authorizing>
                        <Well>
                            <MudText Typo="Typo.body2">Authorizing</MudText>
                        </Well>
                    </Authorizing>
                    <NotAuthorized>
                        @UnauthorizedComponentProvider.GetUnauthorizedComponent()
                    </NotAuthorized>
                </AuthorizeRouteView>
            </CascadingAuthenticationState>
        }
        else
        {
            <RouteView RouteData="routeData" DefaultLayout="@typeof(MainLayout)">
            </RouteView>
        }
        <FocusOnNavigate RouteData="@routeData" Selector="h1"/>
    </Found>
    <NotFound>
        <PageTitle>Not found</PageTitle>
        <LayoutView Layout="@typeof(MainLayout)">
            <MudAlert Severity="Severity.Info">Sorry, there's nothing at this address.</MudAlert>
        </LayoutView>
    </NotFound>
</Router>